package at.fht.bwi.sem5;

import android.app.TabActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import at.fht.bwi.sem5.view.*;

public class AppMain extends TabActivity  {
 TabHost mTabHost;
 FrameLayout mFrameLayout;

 /** Called when the activity is first created.*/
 @Override
 public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    mTabHost = getTabHost();
    
    TabSpec mapSpec = mTabHost.newTabSpec("Map");
    mapSpec.setIndicator("Map");
    
    TabSpec quizSpec = mTabHost.newTabSpec("Quiz");
    quizSpec.setIndicator("Quiz");
    
    Context ctx = this.getApplicationContext();
   
    Intent i = new Intent(ctx, MainMapView.class);
    mapSpec.setContent(i);
    mTabHost.addTab(mapSpec);
    
    Intent j = new Intent(ctx, Steirerquiz.class);
    quizSpec.setContent(j);
    mTabHost.addTab(quizSpec);
    
    mTabHost.setCurrentTab(0);
 }
}